import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Button-FloatingActionButton-FAB按钮',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Button-FloatingActionButton-FAB按钮'),
        ),
          body: Column(
            children: [
              FloatingActionButton(
                backgroundColor: Colors.red,
                  child: Icon(Icons.add),
                  onPressed: (){
                print('red');
              }
              ),
              FloatingActionButton(
                child: Icon(Icons.person),
                  tooltip: 'person',
                  backgroundColor: Colors.blue,
                  foregroundColor: Colors.white,
                  //切换效果
                  heroTag: null,
                  //未点击阴影
                  elevation: 8.0,
                  //点击阴影
                  highlightElevation: 16,
                  //不能点击阴影
                  disabledElevation:0 ,
                  //是否为mini类型，false。有三种类型regular，mini，extend
                  mini: false,
                  //方形样式
                  // shape: Border.all(
                  //   width: 2.0,
                  //   color: Colors.white,
                  //   style: BorderStyle.solid
                  // ),
                  shape: RoundedRectangleBorder(
                    side: BorderSide(
                      width: 2,
                      color: Colors.white,
                      style: BorderStyle.solid
                    ),
                    borderRadius: BorderRadius.only(
                      topRight: Radius.circular(8),
                      topLeft: Radius.circular(8),
                      bottomLeft: Radius.circular(8),
                      bottomRight: Radius.circular(8),
                    )
                  )
                  ,
                  onPressed: (){

              }),
              FloatingActionButton.extended(onPressed: (){},
                label: Text('extended'),
                icon: Icon(Icons.add),),
            ],
          )
      ),
    );
  }
}
